<template>
    <div :class="['swiper-container',className]">
        <div class="swiper-wrapper">
            <slot></slot>
        </div>
        <div class="swiper-pagination" v-if="needPagination"></div>
    </div>
</template>
<script>
    import 'swiper/src/less/swiper.less'
    export default{
        props: {
            needPagination: {
                type: Boolean,
                default: false
            },
            className: {
                type: String,
                default: 'add-swiper-container'
            }
        },
        data(){
            return{

            }
        },
        mounted(){

        }
    }
</script>
<style lang="less" scoped>
    .swiper-container {
        width: 100%;
        height: 3rem;
        margin: 20px auto;
    }
    .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #fff;

        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
</style>
